package com.rub.prajna.av.controller

import com.rub.prajna.av.view.VideoToAudiosView
import javafx.event.ActionEvent
import javafx.fxml.FXML
import javafx.scene.control.Alert
import javafx.scene.control.ButtonType
import java.net.URL
import java.util.*


/**
 */
class VideoToAudiosController : VideoToAudiosView() {


    @FXML
    private fun onActionBtnOK(event: ActionEvent) {
        var inputFile = inputFile?.text
        if (inputFile == null || "" == inputFile) {
            Alert(Alert.AlertType.ERROR, "请选择有视频的文件夹", ButtonType.OK).show()
            return
        }

        if (listVideo(inputFile)?.size < 1) {
            Alert(Alert.AlertType.ERROR, "请选择有视频的文件夹", ButtonType.OK).show()
            return
        }
        listVideo(inputFile).forEach {
            println(it.fileType)
        }

    }

    @FXML
    private fun onActionReset() {


    }

    @FXML
    private fun btnLookAction() {

    }

    override fun initialize(location: URL?, resources: ResourceBundle?) {


    }


}
 


